(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)
data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)
data=attr;}
if(data.indexOf('{')<0)
data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);;
var navTimeout,currentHoverPage;;(function($){$.fn.navmenu=function(options){options=$.extend({},$.fn.navmenu.defaults,options||{});var homePage,cachedDivs={};var $navMenu=$(this);var $parent=$navMenu.parent();if($parent.hasClass('right')||$parent.hasClass('center'))
$parent.height($navMenu.height());for(var i in options.pageInfo){var page=options.pageInfo[i];if(page.P==0){homePage=page;break;}}
var activePages={};var currentPage=options.pageInfo['a'+pageCode],parentPage;if(currentPage){activePages[currentPage.C]=1;while(1){parentPage=getParentPage(currentPage);if(!parentPage)
break;if(homePage&&parentPage.C==homePage.C)
break;currentPage=parentPage;activePages[currentPage.C]=1;}}
function getDivs(pageCode){if(cachedDivs[pageCode])
return cachedDivs[pageCode];var $divs=$();for(var i in options.pageInfo){var page=options.pageInfo[i];if(page.P!=pageCode)
continue;if(page.C in activePages)
var linkClass='activeLink';else
var linkClass='';linkClass+=' nav {pageCode:'+page.C+',parentId:'+page.P+'}';var target='';if(page.R){var url=page.R;target=page.RT;}else if(page.U){var url=page.U;}else{var url='javascript:void(0)';}
$divs=$divs.add($('<div>',{'class':'linkDiv'}).append($('<a>',{href:url,'class':linkClass,html:page.N,target:target})));}
cachedDivs[pageCode]=$divs;return $divs;}
function getParentPage(childPage){for(var i in options.pageInfo){var page=options.pageInfo[i];if(childPage.P==page.C)
return page;}}
$('a',$navMenu).each(function(){var data=$(this).metadata();if(data.pageCode in activePages)
$(this).addClass('activeLink');});$('a.topLevel',$navMenu).mouseover(function(){clearTimeout(navTimeout);var data=$(this).metadata();if(currentHoverPage==data.pageCode)
return;currentHoverPage=data.pageCode;if(options.animate)
$('div.subLevel').slideUp('fast',function(){$(this).remove();});else
$('div.subLevel').remove();if(homePage&&data.pageCode==homePage.C)
return;var $divs=getDivs(data.pageCode);if($divs.length==0)return;var offset=$(this).offset();var parentWidth=$(this).parent().width();if(options.alignment=='Vertical'){var top=offset.top;var left=offset.left+parentWidth;}else{var top=offset.top+$(this).parent().height()
var left=offset.left;}
if(options.animate)
var display='none';else
var display='block';var $div=$('<div>',{'class':'subLevel',css:{top:top,left:left,minWidth:parentWidth,display:display,zIndex:100}}).append($divs).appendTo('body');if(options.animate)
$div.slideDown('fast');}).each(function(){var data=$(this).metadata();var page=options.pageInfo['a'+data.pageCode];if(page&&page.R){$(this).attr('href',page.R).attr('target',page.RT);}});$('div.linkDiv a').live('mouseover',function(){clearTimeout(navTimeout);var offset=$(this).offset();var data=$(this).metadata();$('div.child-of-'+data.parentId).remove();var $divs=getDivs(data.pageCode);if($divs.length==0)return;var top=offset.top;var left=offset.left+$(this).parent().width();$('<div>',{'class':'subLevel child child-of-'+data.parentId,css:{top:top,left:left}}).append($divs).appendTo('body');});$('a.topLevel,a.nav').live('mouseout',function(){clearTimeout(navTimeout);navTimeout=setTimeout(function(){currentHoverPage=0;if(options.animate){$('div.subLevel').slideUp('fast',function(){$(this).remove();});}else{$('div.subLevel').remove();}},1000);});(function(){var $crumbs=$('#breadCrumbs');if($crumbs.length==0||$crumbs.data('initialized')==true)
return;$crumbs.data('initialized',true);if(pageCode==homePage.C){return;}
var i=0;var html='';var currentPage=options.pageInfo['a'+pageCode];if(!currentPage){return;}
while(1){var parentPage=getParentPage(currentPage);if(!parentPage)break;i++;if(currentPage.C==pageCode)
var linkClass='activeCrumb';else
var linkClass='';html='<a href="'+currentPage.U+'" target="'+currentPage.T+'" class="'+linkClass+'">'
+currentPage.N+'</a> &gt; '+html;currentPage=parentPage;}
if(i<3){return;}
html=html.substring(0,html.length-6);html='<a href="'+homePage.U+'">'+homePage.N+'</a> &gt; '+html;$crumbs.html(html).show();})();(function(){if(homePage&&pageCode==homePage.C)
return;var $clickUnder=$('#clickUnder');if($clickUnder.length==0||$clickUnder.data('initialized')==true)
return;$clickUnder.data('initialized',true);var currentPage=options.pageInfo['a'+pageCode];var topLevelPage;if(!currentPage)return;while(1){var parentPage=getParentPage(currentPage);if(homePage&&parentPage.C==homePage.C){break;}
if(homePage&&parentPage.P==homePage.C){topLevelPage=parentPage;break;}
currentPage=parentPage;}
if(!topLevelPage)topLevelPage=currentPage;var $divs=$();for(var i in options.pageInfo){var page=options.pageInfo[i];if(topLevelPage.C!=page.P)
continue;if(options.alignment!='Vertical'&&page.N.substring(0,1)==' '){page.N=page.N.split(' ').join('&nbsp;');}
if(page.C in activePages)
var linkClass='activeLink';else
var linkClass='';linkClass+=' clickLink nav {pageCode:'+page.C+',parentId:'+page.P+'}';$divs=$divs.add($('<div>',{'class':'clickLinkDiv linkDiv',mouseover:function(){if(options.animate)
$('div.subLevel').slideUp('fast',function(){$(this).remove();});else
$('div.subLevel').remove();},mouseout:function(){currentHoverPage=0;}}).append($('<a>',{href:page.U,target:page.T,'class':linkClass,html:page.N})));}
if(options.alignment=='Vertical')
$clickUnder.remove().appendTo($('a.activeLink').parent()).append($divs);else
$clickUnder.append($divs);})();(function(){$footer=$('#superFooter');if($footer.length==0||!homePage)return;var $ul=$('ul','#superFooterParent'),maxHeight=0;$ul.each(function(){var $this=$(this);var data=$this.metadata();for(var i in options.pageInfo){var page=options.pageInfo[i];if(page.P!=data.pageCode)continue;var $newLi=$('li:first',$this).clone();$('a',$newLi).html(page.N).attr('href',page.U);$newLi.appendTo($this);}});$('li.parent','#superFooterParent').each(function(){var height=$(this).height();if(height>maxHeight)maxHeight=height;}).each(function(){$(this).height(maxHeight+'px');});})();}
$.fn.navmenu.defaults={pageInfo:[],alignment:'Vertical',animate:false};})(jQuery);;$(function() {for (var i in tasks) {window.setTimeout(tasks[i], 0);}});function initMenu(){};$(function(){$("#navMenu").navmenu({pageInfo:{"a244467":{"P":0,"ID":468237,"C":244467,"O":0,"U":"http:\/\/www.pestaway.com.au\/","N":"Home","T":"_top","R":"","RT":"_blank"},"a244468":{"P":244467,"ID":244861,"C":244468,"O":"1","U":"http:\/\/www.pestaway.com.au\/pest-controllers.html","N":"Accredited Pest Controllers","T":"_top","R":"","RT":"_blank"},"a244469":{"P":244467,"ID":244862,"C":244469,"O":"2","U":"http:\/\/www.pestaway.com.au\/domestic-pest-control.html","N":"Domestic Pest Control","T":"_top","R":"","RT":"_blank"},"a244470":{"P":244467,"ID":244863,"C":244470,"O":"3","U":"http:\/\/www.pestaway.com.au\/commercial-pest-control.html","N":"Commercial Pest Control","T":"_top","R":"","RT":"_blank"},"a246974":{"P":244467,"ID":246975,"C":246974,"O":"4","U":"http:\/\/www.pestaway.com.au\/home-pest-control.html","N":"How we Solve your Problem","T":"_top","R":"","RT":"_blank"},"a246976":{"P":246974,"ID":246977,"C":246976,"O":"1","U":"http:\/\/www.pestaway.com.au\/termite-control.html","N":"Termite Control Products","T":"_top","R":"","RT":"_blank"},"a246993":{"P":246976,"ID":246999,"C":246993,"O":"1","U":"http:\/\/www.pestaway.com.au\/biflex-termiticide.html","N":"Biflex Termite Spray","T":"_top","R":"","RT":"_blank"},"a246994":{"P":246976,"ID":247000,"C":246994,"O":"2","U":"http:\/\/www.pestaway.com.au\/termidor-termite-treatment.html","N":"Termidor Termite Treatment","T":"_top","R":"","RT":"_blank"},"a246995":{"P":246976,"ID":247001,"C":246995,"O":"3","U":"http:\/\/www.pestaway.com.au\/premise-termite-baits.html","N":"Premise Termite Baits","T":"_top","R":"","RT":"_blank"},"a246996":{"P":246976,"ID":247002,"C":246996,"O":"4","U":"http:\/\/www.pestaway.com.au\/granitgard-termite-barriers.html","N":"GranitGard Termite Barriers","T":"_top","R":"","RT":"_blank"},"a246997":{"P":246976,"ID":247003,"C":246997,"O":"5","U":"http:\/\/www.pestaway.com.au\/exterra-termite-baiting-stations.html","N":"Exterra Termite Baiting Stations","T":"_top","R":"","RT":"_blank"},"a246998":{"P":246976,"ID":247004,"C":246998,"O":"6","U":"http:\/\/www.pestaway.com.au\/sentricon-termite-baits.html","N":"Sentricon Termite Bait","T":"_top","R":"","RT":"_blank"},"a279062":{"P":246974,"ID":279065,"C":279062,"O":"2","U":"http:\/\/www.pestaway.com.au\/pest-control-products.html","N":"Pest Control Products","T":"_top","R":"","RT":"_blank"},"a279071":{"P":279062,"ID":279074,"C":279071,"O":"1","U":"http:\/\/www.pestaway.com.au\/rodent-pest-control.html","N":"Talon Rodent Pest Control","T":"_top","R":"","RT":"_blank"},"a279077":{"P":279062,"ID":279078,"C":279077,"O":"2","U":"http:\/\/www.pestaway.com.au\/rodilon-rat-control.html","N":"Rodilon Rat Control","T":"_top","R":"","RT":"_blank"},"a279079":{"P":279062,"ID":279080,"C":279079,"O":"3","U":"http:\/\/www.pestaway.com.au\/contrac-rat-bait.html","N":"Contrac Rat Bait","T":"_top","R":"","RT":"_blank"},"a279081":{"P":279062,"ID":279082,"C":279081,"O":"4","U":"http:\/\/www.pestaway.com.au\/coopex-insecticides.html","N":"Coopex Insecticides","T":"_top","R":"","RT":"_blank"},"a279087":{"P":279062,"ID":279090,"C":279087,"O":"5","U":"http:\/\/www.pestaway.com.au\/tempo-household-insecticides.html","N":"Tempo Household Insecticides","T":"_top","R":"","RT":"_blank"},"a244471":{"P":244467,"ID":244864,"C":244471,"O":"5","U":"http:\/\/www.pestaway.com.au\/natural-pest-control.html","N":"Natural Pest Control","T":"_top","R":"","RT":"_blank"},"a244472":{"P":244467,"ID":244865,"C":244472,"O":"6","U":"http:\/\/www.pestaway.com.au\/types-of-pest.html","N":"Types Of Pest","T":"_top","R":"","RT":"_blank"},"a279701":{"P":244472,"ID":279722,"C":279701,"O":"1","U":"http:\/\/www.pestaway.com.au\/identifying-pests.html","N":"Identifying Pests","T":"_top","R":"","RT":"_blank"},"a465465":{"P":244472,"ID":465468,"C":465465,"O":"3","U":"http:\/\/www.pestaway.com.au\/fly-pest-control.html","N":"Fly Pest Control","T":"_top","R":"","RT":"_blank"},"a465472":{"P":465465,"ID":465475,"C":465472,"O":"1","U":"http:\/\/www.pestaway.com.au\/disease-transmission.html","N":"Disease Transmission","T":"_top","R":"","RT":"_blank"},"a465478":{"P":465465,"ID":465481,"C":465478,"O":"2","U":"http:\/\/www.pestaway.com.au\/house-fly-control.html","N":"Types of Flies","T":"_top","R":"","RT":"_blank"},"a465485":{"P":465465,"ID":465488,"C":465485,"O":"3","U":"http:\/\/www.pestaway.com.au\/fly-removal.html","N":"How We Work With You","T":"_top","R":"","RT":"_blank"},"a244866":{"P":244467,"ID":244867,"C":244866,"O":"7","U":"http:\/\/www.pestaway.com.au\/pest-control-melbourne.html","N":"Contact Us","T":"_top","R":"","RT":"_blank"}},alignment:"Vertical",animate:0})});